/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package uk.ac.cam.can.algorithm;

/**
 *
 * @author Thomas
 */
public class PosGen{
        private int position;
        private int generalisation;
        
        public PosGen(int position, int generalisation){
            this.position=position;
            this.generalisation=generalisation;
        }
        
        public int position(){
            return position;
        }
        
        public int generalisation(){
            return generalisation;
        }
        
        @Override
        public boolean equals(Object p){
            if(! (p instanceof PosGen))
                throw new IllegalArgumentException();
            if(this.position==((PosGen)p).position() && this.generalisation==((PosGen)p).generalisation())
                return true;
            else
                return false;
        }
        
        @Override
        public String toString(){
            return position+"-"+generalisation;
        }
    }
